home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 001008_john@minster.york.ac.uk_Sun Sep 25 21:50:07 1994.msg < prev    next >
Internet Message Format  |  1994-10-11  |  902b

  1. Received: from minster.york.ac.uk by cs.umb.edu with SMTP id AA11671
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Sun, 25 Sep 1994 21:50:07 -0400
  3. From: john@minster.york.ac.uk
  4. Date: Fri, 23 Sep 94 09:07:57
  5. Message-Id: <swordfish.780544452@minster.york.ac.uk>
  6. To: tex-k@cs.umb.edu
  7. Subject: xdvik-1.8k
  8.  
  9. >In xgetcwd.c, a literal string is assigned to a value which subsequently may be
  10. >freed. Even if this is actually not the case, I'd recommend changing it to:
  11. >
  12. >xgetcwd.c:Revision 0
  13. >110,112c110,113
  14. ><   if (*cwd_path == 0)
  15. ><     cwd_path = "/";
  16. ><   else
  17. >---
  18. >>   if (*cwd_path == 0) {
  19. >>     cwd_path = xmalloc(sizeof("/"));
  20. >>     strcpy(cwd_path, "/");
  21. >>   } else
  22. >
  23. >to conform to the `principle of least surprise'.
  24.  
  25. Whoops - I meant `xrealloc(cwd_path, ' instead of 'xmalloc(', of course!
  26.  
  27. John A. Murdie
  28. Department of Computer Science
  29. University of York
  30. England.
  31.